USE [ERP]
GO

/****** Object:  Table [dbo].[EmployeeSection]    Script Date: 11/16/2009 14:34:00 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[EmployeeSection](
	[EmployeeID] [nvarchar](50) NOT NULL,
	[SectionID] [nvarchar](50) NULL,
	[JobTitleID] [nvarchar](50) NULL,
 CONSTRAINT [PK_EmployeeSection] PRIMARY KEY CLUSTERED 
(
	[EmployeeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[EmployeeSection]  WITH CHECK ADD  CONSTRAINT [FK_EmployeeSection_Employees] FOREIGN KEY([EmployeeID])
REFERENCES [dbo].[Employees] ([ID])
GO

ALTER TABLE [dbo].[EmployeeSection] CHECK CONSTRAINT [FK_EmployeeSection_Employees]
GO

ALTER TABLE [dbo].[EmployeeSection]  WITH CHECK ADD  CONSTRAINT [FK_EmployeeSection_JobTitles] FOREIGN KEY([JobTitleID])
REFERENCES [dbo].[JobTitles] ([ID])
GO

ALTER TABLE [dbo].[EmployeeSection] CHECK CONSTRAINT [FK_EmployeeSection_JobTitles]
GO

ALTER TABLE [dbo].[EmployeeSection]  WITH CHECK ADD  CONSTRAINT [FK_EmployeeSection_Sections] FOREIGN KEY([SectionID])
REFERENCES [dbo].[Sections] ([ID])
GO

ALTER TABLE [dbo].[EmployeeSection] CHECK CONSTRAINT [FK_EmployeeSection_Sections]
GO

